package ProcessScheduling;

public class PcbDTO
{
	static final int Running = 1;
	static final int Ready = 2;
	static final int Waiting = 3;
	private String processName;
	private int runTime;
	private int prority;
	private int processState;
	private int base;
	private int limit;
	private int pcbFlag;
	public PcbDTO(String name, int time,int pro,int base,int limit)
	{
		this.processName = name;
		this.runTime = time;
		this.prority = pro;
		this.processState = 0;
		this.limit = limit;
		this.base = base;
	}
	public PcbDTO()
	{this.pcbFlag = 0;}
	
	public void setProcessName(String name)
	{
		this.processName = name;
	}
	public String getProcessName()
	{
		return processName;
	}
	
	public void setRunTime(int time)
	{
		this.runTime = time;
	}
	public int getRunTime()
	{
		return this.runTime;
	}
	
	public void setPrority(int prority)
	{
		this.prority = prority;
	}
	public int getPrority()
	{
		return this.prority;
	}
	
	public void setProcessState(int state)
	{
		this.processState = state;
	}
	public String getProcessState()
	{
		String s = new String();
		if(this.processState == 1)
		{
			s = "running";
		}
		else if(this.processState == 2)
		{
			s = "ready";
		}
		else if(this.processState == 3)
		{
			s = "waiting";
		}
		return s;
	}
	public int getBase()
	{
		return this.base;
	}
	public void setBase(int base)
	{
		this.base = base;
	}
	public void setLimit(int limit)
	{
		this.limit = limit;
	}
	public int getLimit()
	{
		return this.limit;
	}
	
}
